import { createApp } from "vue";
import { createPinia } from "pinia";
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
import "./style/index.scss";
import App from "./App.vue";
import router from "./router";
import "uno.css";
import { initRoutes } from "@/utils/beforeAppMount";

const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);

const app = createApp(App);

app.use(pinia);

(async () => {
  const sideBarRoutes = await initRoutes();
  app.use(router({ otherRoutes: sideBarRoutes }));
  app.mount("#app");
})();
